package com.currency.mall.util;

import java.text.DecimalFormat;
import java.util.Arrays;

/**
 * Created by Administrator on 2018/12/29.
 */

public class Util {
    public static boolean useList(String[] arr,String targetValue){
        return Arrays.asList(arr).contains(targetValue);
    }

    public static String formatTosepara(double data) {
        DecimalFormat df = new DecimalFormat("#,###.00");
        if(data>0 && data <1){
            return data+"";
        }else if(data ==0.00){
            return "0.00";
        }else{
            return df.format(data);
        }
    }
}
